Skip to content

fix(governance): enforce satisfiable solo-maintainer rulesets - #1176

Open
seonghobae wants to merge 127 commits into
mainfrom
fix/stacked-pr-central-required-workflows
Open

fix(governance): enforce satisfiable solo-maintainer rulesets#1176
seonghobae wants to merge 127 commits into
mainfrom
fix/stacked-pr-central-required-workflows

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Current purpose — 2026-09-02

This existing writer lane owns the executable ruleset-audit repair for the solo-maintainer governance decision in #772/#1351. Superseded 2 approvals + last-push approval guidance must not be restored from predecessor comments or evidence.

Current exact writer head: 44b4ea473bdd8753e992465c76ce347e02994e5a.

Protected main@fb021296afbe7c27e30363627971fc9d36d12979 is integrated without force-push or history rewrite. Fresh comparison is behind_by=0; the final tree differs from protected main in exactly seven intended governance paths:

  • .github/workflows/audit-central-ruleset.yml
  • docs/org-required-workflow-rollout.md
  • scripts/ci/audit_central_required_workflows.py
  • tests/test_central_required_workflow_ruleset_audit.py
  • tests/test_ruleset_audit_completeness_regression.py
  • tests/test_ruleset_merge_method_shape_regression.py
  • tests/test_solo_maintainer_ruleset_policy.py

The integrated protected-main ancestry includes the merged current-head run coalescer (#1645), Strix required-smoke availability repair (#1650), and evidence-driven OpenCode review-policy repair (#1654). Every check and review must still regenerate on this exact successor head; predecessor evidence does not transfer. Queued or pending current-head runs remain non-passing until terminal success.

Current governance contract

For the one-human-maintainer operating model:

  • organization and .github repository rulesets use required_approving_review_count = 0 while no genuinely independent human reviewer exists;
  • require_last_push_approval = false;
  • require_code_owner_review = false while the sole code owner is also the author;
  • absent/empty required_reviewers is required; a bot/service/user cannot manufacture human independence;
  • stale-review dismissal and required review-thread resolution remain enabled;
  • exact central required workflows, default-branch-only scope and do_not_enforce_on_create=true remain enforced;
  • only merge and squash are allowed;
  • deletion and non-fast-forward protection remain required; and
  • routine bypass actors are forbidden. Emergency access belongs to a separately governed, time-bounded break-glass path rather than OrganizationAdmin/always.

This changes only structurally impossible generic human-approval gates. It does not self-approve, invent bot approvals, transfer old evidence, disable semantic/security gates, or authorize protected-branch bypass.

Durable TDD and proof lineage

The regression suite was written before production changes and now fail-closes on synthetic reviewers, code-owner/last-push approval deadlocks, malformed or extra workflows, creation restrictions, malformed merge-method payloads, rebase drift, undeclared rule types and missing/malformed/non-empty bypass evidence. The passing fixtures explicitly state the code-owner policy. Auditor failures are aggregated after successful reads so simultaneous drift is visible. The temporary focused source-fix workflow executed the permanent governance regression set successfully and was removed before this final diff; permanent coverage requires it to remain absent. All current inline review threads are resolved.

Live drift and authorized settings boundary

Fresh full-payload reads on 2026-09-02 still show inherited organization ruleset 18156473 active with required_approving_review_count = 1, require_code_owner_review = false, require_last_push_approval = false, required_reviewers = [], default-branch-only scope, merge/squash methods, deletion/non-fast-forward protection, and OrganizationAdmin/always bypass. The declared solo-maintainer contract is therefore not live yet.

The .github repository ruleset 17921150 has approval 0/code-owner false/last-push false but still permits rebase and retains OrganizationAdmin/always bypass.

GitHub's REST contract exposes ruleset update endpoints to appropriately privileged identities, but the connected GitHub action surface in this environment exposes ruleset reads and not settings mutation. The repository-metadata reconciler credential is deliberately scoped to metadata/Pages and must not be silently broadened into organization governance authority. #1340 records the privileged owner-plane mutation boundary.

Acceptance requires exact-current-head central checks/reviews, authorized live ruleset reconciliation with no routine bypass/synthetic reviewer/rebase/code-owner drift, a fresh full-payload read, and an unchanged deterministic-GREEN consumer canary. ContextualWisdomLab/Orgmetra#88@0dc4f09cc3c87829ea1e3a0e3dc0188df07ad8cd remains the canary for proving the ordinary protected path after settings reconciliation. Do not use routine administrator bypass as a substitute.

Refs #712, #772, #1200, #1340, #1351.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 25a3cb7d-639d-4a81-a779-32a19d9501fe

📝 Walkthrough

Walkthrough

Changes

에이전트 멘션 동시성

Layer / File(s) Summary
인터랙티브 동시성 계약
.github/workflows/agent-mention-*.yml, docs/doctoring/agent-mention-concurrency-isolation.md, tests/test_agent_mention_*, CHANGELOG.md
인터랙티브 에이전트 멘션에서 로컬 concurrency와 지원되지 않는 queue: max를 제거했습니다. 예약 sweep은 취소하지 않는 별도 동시성 그룹을 유지합니다. 관련 문서와 테스트를 갱신했습니다.

중앙 required-workflow 적용 범위

Layer / File(s) Summary
규칙셋 범위와 감사 검증
scripts/ci/audit_central_required_workflows.py, tests/test_central_required_workflow_ruleset_audit.py, docs/org-required-workflow-rollout.md, docs/adr/0001-central-review-stacked-pull-requests.md, README.md
중앙 규칙셋의 대상 범위를 ~DEFAULT_BRANCH에서 ~ALL로 변경했습니다. stacked pull request의 base branch 적용 내용을 문서화하고, 감사 스크립트와 회귀 테스트를 갱신했습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to c18d8

This PR expands central governance reviews to stacked branches, but its validation currently permits malformed branch-scope configurations that could allow required review coverage to be missed without detection. The audit contract and regression tests should be tightened before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.64% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 4 files. (5 skipped: 5 unsupported.) Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning 제목은 제안 브랜치 생성 전환을 설명하지만, 변경사항의 핵심인 스택형 PR 거버넌스와 중앙 규칙셋 범위 변경을 반영하지 않습니다. 스택형 PR에 중앙 필수 워크플로를 적용하고 규칙셋 범위를 모든 브랜치로 확장한 변경을 제목에 명시하십시오.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stacked-pr-central-required-workflows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation at c11fb657e1a71fabd8cdbf06d1e6a821163bd836:

  • live CWL Central required workflows ruleset 18156473: active, repository_name.include=["~ALL"], ref_name.include=["~ALL"], seven central workflows, two approving reviews; audit script: PASS;
  • tests/test_central_required_workflow_ruleset_audit.py: 16 passed;
  • audit module: 130 statements / 66 branches, 100% coverage;
  • interrogate 100%, compileall, and git diff --check passed.

The full central suite had prior 100% evidence on the unchanged main source; this PR adds only the scoped audit/docs/ADR/test contract. Hosted current-head Checks and two qualifying independent approvals remain required; no bypass or self-approval.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Successor current-head validation at ab65fcc7dd6547e84cca8a699430d06077dad022:

  • live ruleset 18156473: active, repository_name.include=["~ALL"], ref_name.include=["~ALL"], seven central workflows, two approving reviews; audit script: PASS;
  • focused audit tests: 16 passed; audit module coverage 100%; interrogate 100%; compileall and git diff --check passed.

The documentation-only successor preserves the implementation proof; stale predecessor-head review evidence does not count. A fresh exact-head independent review and current hosted Checks remain required before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact current head is now bc2c93ac88599837555cb1ff3292bb49d245dc5a after the ledger timestamp refresh. Focused audit proof remains unchanged; hosted required Checks and fresh exact-head review must be evaluated on this successor.

@seonghobae
seonghobae enabled auto-merge (squash) August 20, 2026 18:35
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for bc2c93a: verified the live organization ruleset 18156473 is active with ref_name.include=[~ALL], and the PR aligns the audit code, regression fixture, ADR, and operator rollout ledger with stacked pull-request coverage. Passed: 16 central ruleset audit tests, Ruff, compileall, and git diff --check. Please review this exact head; merge remains gated on an independent non-author approval and terminal protected checks.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review the current PR head bc2c93a. Verify the live ruleset alignment, stacked-PR scope audit, changed-file evidence, current mergeability, and required checks. Do not approve a stale head.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current HEAD bc2c93a. Inspect the complete diff, validate security and regression behavior, and publish only evidence bound to this SHA. Do not transfer predecessor approval, modify the branch, or merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent please review exact current HEAD bc2c93ac88599837555cb1ff3292bb49d245dc5a against main; verify stacked-branch required-workflow scope, live ruleset audit, and protection invariants.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review please independently review exact current HEAD bc2c93ac88599837555cb1ff3292bb49d245dc5a against main; verify the all-branch ruleset audit and central workflow/protection invariants.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Reproduced and fixed the central router Check failure at exact HEAD 501fe541b725f611145d42672c66b3411287d36d: repository_dispatch was using a job token with actions: read, and the local concurrency block contained unsupported queue: max. The local router now has actions: write, valid native concurrency, and regression coverage. Tests: 8 passed; full actionlint and diff check pass. @opencode-agent please re-review this exact HEAD.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review independently re-review exact current HEAD 501fe541b725f611145d42672c66b3411287d36d against main; verify repository-dispatch permission, actionlint-valid concurrency, and central stacked-PR governance.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

Exact-head causal repair evidence for aa63517844476ad5d5cfac37f6126d640d5d5115:

  • Current-head root cause: deleting unsupported concurrency.queue while retaining the local concurrency group permits only one pending run; a later trusted mention can replace an earlier pending mention before its durable claim exists. The same commit also expanded local Actions permission from read to write even though repository dispatch is authorized by the existing contents: write scope and artifact access is read-only.
  • RED: four focused contract failures reproduced the replacing local queue and unused actions: write grant.
  • Narrow fix: remove the local route's concurrency group entirely, preserve the scheduled sweep's separate single-flight group, restore actions: read, and converge the doctoring/changelog contract on GitHub's supported one-running/one-pending semantics.
  • Focused GREEN: 8 passed.
  • Full GREEN: 1,235 passed plus 16 subtests.
  • compileall and git diff --check pass.
  • All six exact GitHub blobs match the locally verified files.

Hosted exact-head workflows and independent formal review remain separate non-passing gates until terminal evidence exists.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for aa63517844476ad5d5cfac37f6126d640d5d5115: 27 focused agent-mention/ruleset tests passed; actionlint passed for .github/workflows/agent-mention-router.yml; compileall and git diff --check passed. The PR scope remains governance-only, with Figma File ID N/A. Review this exact head against the protected ruleset before merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review\nHead SHA: aa63517\nReview current HEAD only; check ruleset scope, stacked-PR required workflows, workflow permissions, and all changed tests/docs. Re-run after any push.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for aa63517844476ad5d5cfac37f6126d640d5d5115: 24 focused governance/router tests passed; actionlint passed for .github/workflows/agent-mention-router.yml; compileall and git diff --check passed. The least-privilege route keeps Contents write for repository dispatch and Actions read for artifact reads; no Figma UI contract applies (Figma File ID: N/A).

@seonghobae

Copy link
Copy Markdown
Contributor Author

@opencode-agent review\nHead SHA: aa63517\nReview this exact head only, including least-privilege permissions, repository-dispatch authorization, and all changed queue/idempotency contracts. Re-run after any push.

Copy link
Copy Markdown
Contributor Author

Exact-head verification for the stacked central workflow governance change.

Current pushed head: a7aeb5683b25d1f82fb4ac2f72685391f3bccf62

Root cause fixed: GitHub Actions rejects the unsupported concurrency.queue key in both agent-mention-noema-dispatch.yml and agent-mention-opencode-dispatch.yml, preventing the downstream dispatch workflows from starting. Removed only that key; exact invocation-key groups and cancel-in-progress: false remain unchanged. Updated the existing contract test to reject the unsupported key.

Verified at this exact head:

  • RED: the updated contract test failed on the predecessor because both wrappers contained queue: max.
  • uv run pytest -q tests/test_agent_mention_downstream_idempotency.py: 4 passed after the fix.
  • uv run pytest -q tests/test_agent_mention_*.py: 84 passed.
  • uv run coverage run -m pytest -q: 1235 passed, 16 subtests passed.
  • coverage report: 100% statement and branch coverage; interrogate: 100%.
  • actionlint on both downstream workflows, compileall, and git diff --check: passed.

@opencode-agent please perform the independent formal review for current head a7aeb5683b25d1f82fb4ac2f72685391f3bccf62. Review-only request: do not merge or enable auto-merge.

Copy link
Copy Markdown
Contributor Author

Correction to the previous evidence comment: the exact pushed/current PR head is a7aeb56804c043b97f837a82d9066dfc03eec938. The verification results and requested review apply to this exact head. @opencode-agent please review this SHA independently; do not merge or enable auto-merge.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Queued @opencode-agent for PR #1176 at head c18d8c03f6b7c09253e4f89b0741f24fdcfe96f2. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Queued @cwl-noema-review for PR #1176 at head c18d8c03f6b7c09253e4f89b0741f24fdcfe96f2. Central exact-name Actions artifacts are the durable dispatch ledger; existing review workflows remain authoritative for the final verdict and failure evidence.

devin-ai-integration[bot]

This comment was marked as resolved.

Preserve protected main #1625 byte-for-byte in its four owned paths while retaining the solo-maintainer governance writer. No force-push or history rewrite.
Preserve protected main #1466 binary documentation evidence while retaining the seven intended solo-maintainer governance paths. Comparison before merge showed the writer one commit behind and differing from current main only in those seven intended paths. No force-push or history rewrite.
Restore the six protected-main #1466 paths byte-for-byte after ancestry integration exposed that the writer tree still carried predecessor content. This keeps the governance delta limited to its intended seven paths without force-push or history rewrite.
Preserve protected main #1640 documentation cleanup while retaining only the seven intended solo-maintainer governance paths. Fresh pre-merge comparison showed the writer one commit behind and no content delta outside those seven paths. No force-push or history rewrite.
Restore protected main #1640 documentation retirement byte-for-byte after ancestry integration exposed two predecessor documentation paths still present in the writer tree. Keep the final delta limited to the seven intended governance paths.
Integrate ContextualWisdomLab/.github main@7683f1da91f1fc9e046660169f1f7ac4aabcc3c6 without force-push. Preserve the seven governance-owned paths while taking the six queue-hygiene files byte-for-byte from protected main.

Copy link
Copy Markdown
Contributor Author

Ownership split after fresh causal analysis: keep this PR scoped to executable audit/regression/rollout contract. The previously missing settings-application mechanism is now isolated in #1644 (fix/ruleset-owner-plane-reconciler) rather than being folded into this already-large writer. #1644 cannot mutate from PR code and is inert after merge unless an independently provisioned protected owner-plane credential plus explicit enable variable exist. It preserves this PR's target policy and will make a later fresh live read auditable rather than representing source state as settings state.

Do not merge or restack this PR merely because #1644 exists. Its current exact head still needs its own terminal evidence, and #1176 still needs fresh exact-head deterministic/review evidence plus post-reconciliation live payload proof.

@seonghobae
seonghobae enabled auto-merge (squash) September 1, 2026 22:16
…leset repair

Preserve the seven solo-maintainer governance paths from the existing writer while taking all other files byte-for-byte from protected main@cfcde258dc2836838d00982ed812dd3b9d6072ca. This non-rebase two-parent merge retains concurrent queue-coalescing, OpenCode, Noema, Strix and runner-capacity repairs without force-push or history rewrite.
seonghobae added a commit that referenced this pull request Sep 1, 2026
Preserve the owner-plane reconciler's seven unique paths, including RED-first review regressions and their fixes, while taking the complete current #1176 tree as the canonical governance base. This keeps protected main and the solo-maintainer audit repair byte-for-byte current without force-push or rebase.
@opencode-agent
opencode-agent Bot disabled auto-merge September 1, 2026 23:50
…leset repair

Preserve the seven solo-maintainer governance files from the existing writer while taking every other path from protected main@fb021296afbe7c27e30363627971fc9d36d12979. This non-rebase two-parent merge retains the OpenCode evidence-driven review repair without force-push or predecessor-evidence transfer.
@seonghobae
seonghobae enabled auto-merge (squash) September 2, 2026 00:17

Copy link
Copy Markdown
Contributor Author

Fresh downstream/control-plane revalidation after protected-main movement — 2026-09-02 KST

The live protected .github/main has advanced to 6a25bc11d58a2e36da9ccea390ade6ccee57ec4d via #1656. This PR still reports exact head 44b4ea473bdd8753e992465c76ce347e02994e5a with recorded base SHA fb021296afbe7c27e30363627971fc9d36d12979; current head checks include queued jobs and no observed terminal failure. The previous body claim behind_by=0 is therefore stale evidence and must not authorize merge or ruleset reconciliation.

RED acceptance: before this governance writer can become merge-ready, re-integrate the new protected-main ancestry non-destructively in the existing owner lane, then regenerate all exact-successor-head review/check evidence. Do not transfer the 44b4ea predecessor check set, do not cancel/re-run currently queued jobs merely for latency, and do not use admin bypass.

Required GREEN: fresh live-main/head comparison shows no missing protected-main ancestry; diff remains limited to the intended governance paths; review threads and exact-head required checks are re-read; then the settings-authority step still separately proves live organization/repository rulesets match the solo-maintainer contract before the unchanged Orgmetra #88 consumer canary is revalidated.

Copy link
Copy Markdown
Contributor Author

Fresh protected-main movement invalidated the predecessor alignment evidence again.

Current owner truth at re-read:

RED: the current #1176 head is no longer current-main-aligned and its previous exact-head checks/reviews cannot authorize integration after a parent merge.

Owner-lane remedy remains non-destructive integration of the exact live protected-main ancestry into this existing branch, with any real conflict resolved at the causal seven-path boundary and no force-push/destructive rebase. Then regenerate all checks/reviews on the successor head. Do not carry predecessor GREEN, do not use admin bypass, and do not mutate the Orgmetra consumer canary merely to create activity.

GREEN: fresh live-main/successor-head comparison behind_by=0, GitHub mergeability restored, intended governance diff still bounded, every applicable exact-successor-head deterministic/review gate terminal, and only then proceed to the separately authorized live ruleset-settings reconciliation followed by unchanged Orgmetra #88 revalidation.

@opencode-agent
opencode-agent Bot disabled auto-merge September 2, 2026 01:48

Copy link
Copy Markdown
Contributor Author

LifeOS consumer evidence (fresh 2026-09-01): inherited organization ruleset 18156473 is active on ContextualWisdomLab/life-os and still requires required_approving_review_count=1, with OrganizationAdmin/always bypass. LifeOS is operated by one human maintainer and its protected-main AGENTS.md explicitly forbids inventing independent reviewers, synthetic approvals, and routine admin bypass. This currently blocks otherwise clean LifeOS PRs after exact-head gates complete. Please keep LifeOS in the consumer-canary set for the solo-maintainer reconciliation: after protected .github integration + authorized live ruleset update, fresh-read LifeOS ruleset 18156473 must show approval count 0, no code-owner/last-push deadlock, no routine bypass, while required workflows/thread resolution/deletion/non-fast-forward protections remain intact. Then rerun an unchanged deterministic-GREEN LifeOS PR through the ordinary protected merge path without admin bypass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work scope: product-gap Customer-visible product gap status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants